package com.dronff.gvm.entity;

import com.dronff.gvm.interfaces.Memorize;
import com.dronff.gvm.interfaces.Readable;
import com.dronff.gvm.interfaces.Writable;
import com.dronff.gvm.memorymanager.Memory;
import com.dronff.gvm.memorymanager.impl.MiniMemoryImpl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author: tyf
 * @date: 2022/9/9 20:56
 * @description: todo(
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
public class Klass implements Memorize<Klass> {
    // 当前类信息所在的地址
    Readable klass;
    // 父类引用
    Readable superKlass;
    // 当前类名
    String name;
    // 父类名
    String superKlassName;
    // 访问标识
    private int accessFlag;
    // 接口引用
    private Interfice[] interfaces;
    // 字段引用
    private Field[] fields;
    // 常量池引用
    @Override
    public void write(Writable writable) throws IndexOutOfBoundsException {

    }

    @Override
    public Klass read(Readable writable) throws IndexOutOfBoundsException {
        return null;
    }
    private Klass(){}
    public static Klass getUnInitInstance(){
        return new Klass();
    }
}
